 select  * from FSoftNAV2WEB.dbo.[Object] where Name like 'VMI%'

 select  wop.* from dbo.[Object] wo
	inner join dbo.[Object_properties] wop on wo.ID = wop.[Object_id]	
 where wo.ID = 8
 SELECT * FROM sys.objects where type = 'U'
INSERT INTO [dbo].[Object_properties]
           ([Name]
           ,Caption
           ,[Type]
           ,[Data_length]
           ,[Active]
           ,[Database_id]
           ,[Object_id]
           )

select c.name,c.name,tp.name,c.max_length, 1,c.column_id,wo.ID 
from sys.columns c	
	inner join sys.types tp on c.system_type_id = tp.system_type_id
	inner join dbo.[Object] wo on c.[Object_id] = wo.[Database_id]
where c.name COLLATE Latin1_General_CS_AS not in (select  wop.Name from dbo.[Object_properties] wop where wo.ID = wop.[Object_id]	)
and wo.ID = 8
and c.name <> 'timestamp'


UPDATE [dbo].[Object_properties]
   SET 
     
      [Form_tab_index] = 1
      ,[Grid_order] = 1
	
      ,[Editable] = 1     
      ,[Not_blank] = 0
    where  [Not_blank] is null
 
GO

 

 
 